# ########## Project setup ##########
project(clsocket)
cmake_minimum_required(VERSION 2.6)

# ######### General setup ##########
include_directories(${CMAKE_SOURCE_DIR})
if(APPLE)
	add_definitions(-D_LINUX -D_DARWIN)
endif()

# ########## clsocket library ##########
# Sources:
set(clsocket_library_SRCS
      ActiveSocket.cpp
      PassiveSocket.cpp
      SimpleSocket.cpp
)

# Headers:
set(clsocket_library_HDRS
      ActiveSocket.h
      PassiveSocket.h
      SimpleSocket.h
      Host.h
      StatTimer.h
)

# actual target:
add_library(clsocket SHARED ${clsocket_library_SRCS})

# add install target:
install(TARGETS clsocket DESTINATION lib)
install(FILES ${clsocket_library_HDRS} DESTINATION include/clsocket)
